home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FM Towns: Free Software Collection 8
/
FM Towns Free Software Collection 8.iso
/
t_os
/
artemis
/
artsrc2
/
grblk.c
< prev
next >
Wrap
C/C++ Source or Header
|
1994-06-01
|
1KB
|
58 lines
/*
grblk.c
*/
#include <stdio.h>
#include <egb.h>
#include <msdos.cf>
#include <ryosuke.h>
#include <usrlib.h>
void grgetblk(char *buf, int x1, int y1, int xlen, int ylen)
{
char para[14];
DWORD(para + 0) = (unsigned long) buf;
WORD(para + 4) = getds();
WORD(para + 6) = x1;
WORD(para + 8) = y1;
WORD(para + 10) = x1 + xlen - 1;
WORD(para + 12) = y1 + ylen - 1;
EGB_getBlock( EGB_work, para );
}
void grputblk(int x1, int y1, int xlen, int ylen, char *data, int op)
{
char para[14];
EGB_writeMode(EGB_work, op);
EGB_color( EGB_work, 3, 0 );
DWORD(para + 0) = (unsigned long) data;
WORD(para + 4) = getds();
WORD(para + 6) = x1;
WORD(para + 8) = y1;
WORD(para + 10) = x1 + xlen - 1;
WORD(para + 12) = y1 + ylen - 1;
EGB_putBlock( EGB_work, 0, para );
EGB_writeMode( EGB_work, DrawNORMAL );
}
void grp_putblk_zoom(int x1, int y1, int xlen, int ylen, char *data,
int op, int zoomx, int zoomy)
{
char para[14];
EGB_writeMode(EGB_work, op);
EGB_color(EGB_work, 3, 0);
DWORD(para + 0) = (unsigned long) data;
WORD(para + 4) = getds();
WORD(para + 6) = x1;
WORD(para + 8) = y1;
WORD(para + 10) = x1 + xlen*zoomx - 1;
WORD(para + 12) = y1 + ylen*zoomy - 1;
WORD(para + 14) = xlen;
WORD(para + 16) = ylen;
EGB_putBlockZoom( EGB_work, 0, para );
EGB_writeMode( EGB_work, DrawNORMAL );
}
/* end of grblk.c */